package com.atguigu01._this;

/**
 * ClassName: UserTest
 * Package: com.atguigu01._this
 * Description:
 *
 * @Author 姜
 * @Create 2023/11/21 10:56
 * @Version 1.0
 */
public class UserTest {
    public static void main(String[] args) {
        // 只创建了User一个对象
    }
}

class User {
    String name;
    int age;

    public User() {
        // 模拟对象创建时，需要初始化50行代码。

    }

    public User(String name) {
        this();
        this.name = name;
    }

    public User(String name, int age) {
        this(name);
        this.age = age;
    }
}
